<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<?php 

$username = "";
$password = "";
$repeatedPassword = "";

	if(isset($_POST["submit"])) {
		$username = $_POST["username"];
		$password = $_POST["password"];
		$repeatedPassword = $_POST["repeatedPassword"];
		
		
		if($username == ""){
			echo "<p>Please enter username!</p>";
			
		}
		
		if($password == ""){
			echo "<p>Please enter password!</p>";
			
		} 
		
		if($password == $repeatedPassword){
			$criptedPass = md5($password);
			echo "Hello your Username is $username and your cripted password is: $criptedPass";
		} else {
			
		}
	}
?>
<html>
<head>
<title>Exercise 1</title>
</head>
<body>
    <form method="post" action="exersice2.php">
    	<p>	 
    		Username: <input type="text" name="username" value="<?php echo $username;?>"/>   	
	    </p>
	    <p>	 
    		Password: <input type="password" name="password" value="<?php echo $password;?>"/>   	
	    </p>
	    <p>	 
    		Repeat Password: <input type="password" name="repeatedPassword" value="<?php echo $repeatedPassword;?>"/>   	
	    </p>
	    <p>
	    	<input type="submit" value="Sign Up" name="submit">
    	</p>
    </form>		
</body>
</html>